package com.example.demo.mapper;

import com.example.demo.domain.RoomShceduie;
import org.apache.ibatis.annotations.*;

import java.util.List;

@Mapper
public interface RoomShceduieMapper {
    //查询所以数据
    @Select("select * from room_shceduie")
    public List<RoomShceduie> findAllRoom();

    //删除数据
    @Delete("delete from room_shceduie where id=#{id}")
    public int deleteRoom(Integer id);

    //修改数据
    @Update("update room_shceduie set room_no=#{roomNo},state=#{state},Reserved=#{reserved} where id=#{id}")
    public int updateRoom(RoomShceduie roomShceduie);

    //添加数据
    @Insert("insert into room_shceduie(room_no,state,Reserved) values (#{roomNo},#{state},#{reserved})")
    public int addRoom(RoomShceduie roomShceduie);

    //多条件查询
    public List<RoomShceduie> findRoom(RoomShceduie roomShceduie);
}


